package com.xbongbong.pro.workorder;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * xbb自己的短链接返回
 * @author 魏荣杰
 *
 */
@Getter
@Setter
@ToString
public class XbbShortUrlResponse {

    String action;

    Result result;

    @Getter
    @Setter
    @ToString
    public static class Result {

        @JSONField(name = "shortened_links")
        List<ShortenedLinks> shortenedLinks;

        public Result() {
        }

        public Result(List<ShortenedLinks> shortenedLinks) {
            this.shortenedLinks = shortenedLinks;
        }

        @Getter
        @Setter
        @ToString
        public static class ShortenedLinks {

            @JSONField(name = "long_url")
            String longUrl;

            @JSONField(name = "short_url")
            String shortUrl;

            public ShortenedLinks() {
            }

            public ShortenedLinks(String longUrl, String shortUrl) {
                this.longUrl = longUrl;
                this.shortUrl = shortUrl;
            }
        }
    }


}
